{
gchar alpha[G_ASCII_DTOSTR_BUF_SIZE];
- g_ascii_formatd (alpha, G_ASCII_DTOSTR_BUF_SIZE, "%.17f", CLAMP (rgba->alpha, 0, 1));
+ g_ascii_formatd (alpha, G_ASCII_DTOSTR_BUF_SIZE, "%g", CLAMP (rgba->alpha, 0, 1));
return g_strdup_printf ("rgba(%d,%d,%d,%s)",
(int)(0.5 + CLAMP (rgba->red, 0., 1.) * 255.),
{
char buf[G_ASCII_DTOSTR_BUF_SIZE];
- g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%.17f", d);
+ g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%g", d);
g_string_append (string, buf);
}
/* fall through */
case GTK_CSS_TOKEN_SIGNLESS_INTEGER_DIMENSION:
case GTK_CSS_TOKEN_DIMENSION:
- g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%.17f", token->dimension.value);
+ g_ascii_dtostr (buf, G_ASCII_DTOSTR_BUF_SIZE, token->dimension.value);
g_string_append (string, buf);
append_ident (string, token->dimension.dimension);
break;
g_string_append (string, "infinite");
else
{
- g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%.17f", number->value);
+ g_ascii_dtostr (buf, sizeof (buf), number->value);
g_string_append (string, buf);
if (number->value != 0.0)
g_string_append (string, names[number->unit]);